body {
font-family: Arial;
background-color: #B1D4E0;
color: white;
}

h2 {
  color: white;
}

p {
  font-family: Arial, sans-serif;
  font-size: 16px;
  color: navy;
}

Project requirements


I created a README file in my stats220 repository. Firstly, I made the headers and subheaders stand out more by using different font sizes and formatting. I did this by having 2 different levels of headers (bigger header is “Stats220” with 1 hashtag, and the smaller header “Projects” with 2 hashtags). The goals for the project are listed clearly in bullet points (unordered list), and the list of projects is presented in a numbered list for easy reference (ordered list). I retained the italics for the R tips and tricks section and emphasized the disclaimer with both bold and italics. Lastly, I provided a clearer indication of the link embedded within the text. Here is a link to my repo and the link to the tips and tricks website*


My meme




I built on the inspo meme above by adding 3 more images of hamster expression pictures sourced from google. I then overlaid different text onto each picture, describing four distinct expressions and changed the colour of the text to white for max contrast. However, the text looked a bit plain and blended into the blackground. To enhance the visibility of the text against the background (the hamster pictures), I applied a technique to mimic an outline effect. This involved duplicating the text and adjusting its orientation slightly (by -2,-2), creating a subtle 3D effect. Then, for the static meme, I just combined all 4 frames so they are produced side by side. For the animation, I morphed the frames, changing the frames per second to 5 to have a smoother transition when animating.


#static meme code

# Load the meme images + add text. To add an outline for the text, I added the same text and just changed the location by a bit.

frame1 <- image_read("inspo_meme2.jpg") %>%
  image_annotate("First week of uni:D", color = "darkgrey", size = 50, gravity = "north") %>%
  image_annotate("First week of uni:D", color = "#B1D4E0", size = 50, gravity = "north", location = "+2+2", font = "arial") 

frame2 <- image_read("inspo_meme.png") %>%
  image_annotate("Literally today D:", color = "darkgrey", size = 50, gravity = "north") %>%
  image_annotate("Literally today D:", color = "#B1D4E0", size = 50, gravity = "north", location = "+2+2", font = "arial") 

frame3 <- image_read("inspo_meme3.jpg") %>%
  image_annotate("How is it already", color = "darkgrey", size = 40, gravity = "north") %>%
  image_annotate("How is it already", color = "#B1D4E0", size = 40, gravity = "north", location = "+2+2", font = "arial") 

frame4 <- image_read("inspo_meme4.jpg")%>%
  image_annotate("Week 3???", color = "darkgrey", size = 50, gravity = "north") %>%
  image_annotate("Week 3???", color = "#B1D4E0", size = 50, gravity = "north", location = "+2+2", font = "arial")

# putting the frames in order using a vector
frames <- c(frame1, frame2, frame3, frame4)

my_meme = image_append(frames)
my_meme

#animation code

animated_gif <- image_morph(frames) %>%
  image_animate(fps = 5)

image_write(animated_gif, "my_animation.gif")

Creativity

 

My project demonstrates creativity because I specifically outlined the text in the meme photos by duplicating the text and changing the location of one of those texts slightly so there would be a 3D effect. I have also added a gif of a cat (Maxwell) that looks like my cat (Toby) onto the start of the html file. Paw print gifs were also planted to divide some section and make it less “wordy”. I also added white space by using backslash in markdown for the same reason.


Learning reflection


One important idea I learned from Module 1 Creating HTML by combining modern technologies is the use of the %>% function, also known as the pipe operator. Piping not only saves considerable time but also simplifies the code significantly compared to nesting multiple functions. With %>%, the size of the code drastically reduces, making it more concise and readable. Thisefficiency has sparked my curiosity to explore further shortcuts, simpler methods, and additional functions in R code. I’m particularly interested in delving deeper into data manipulation techniques, exploring tools and models for efficient data analysis. I have found R to be quite similar to other languages I have learnt so far and cannot wait to explore more similarities!